import { MENU } from '@/services/admin/typings'
import { request } from '@umijs/max'

export const fetchMenuTree = async () => {
  return await request<MENU.MenuTreeVO[]>('/api/menu/tree', { method: 'GET' })
}

export const fetchMenuIdsByRoleId = async (roleId: string) => {
  return await request<number[]>(`/api/menu/getMenuIdList?roleId=${roleId}`)
}
